<template>
  <el-card shadow="never">
<!--     <template v-if="userOperaPermit" >-->
<!--       <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">-->
<!--         <el-tab-pane label="商户列表" name="first">-->
<!--           <retail-shop-list></retail-shop-list>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane label="商户审核" name="second">-->
<!--           <retail-admin-shop-list></retail-admin-shop-list>-->
<!--         </el-tab-pane>-->
<!--       </el-tabs>-->
<!--     </template>-->
<!--    <template v-else>-->
      <retail-shop-list></retail-shop-list>
<!--    </template>-->
  </el-card>
</template>

<script lang="ts" setup>

import {onMounted, ref} from "vue";
import {userStore} from "@/store";
import type { TabsPaneContext } from 'element-plus'
import RetailShopList from "@/views/shop/RetailShopList.vue";
import RetailAdminShopList from "@/views/shop/RetailAdminShopList.vue";

const store = userStore();
const userInfo = store.userInfo;

const userOperaPermit = ref(false)

const activeName = ref('first')

const handleClick = (tab: TabsPaneContext, event: Event) => {
  console.log(tab, event)
}

const initPermit = () => {
  let roleIds = userInfo.roles;
  userOperaPermit.value = (roleIds.length == 1 && roleIds.includes(3)) ? false : true;
}

onMounted(() => {
  initPermit();
})
</script>

<style>
</style>
